package com.chainyoung.component_tmperson.ui.mvp.model;


import com.chainyoung.common.di.scope.ActivityScope;
import com.chainyoung.common.integration.IRepositoryManager;
import com.chainyoung.common.mvp.BaseModel;
import com.chainyoung.common.utils.RxUtils;
import com.chainyoung.component_tmperson.api.PersonService;
import com.chainyoung.component_tmperson.entity.InviteFriend;
import com.chainyoung.component_tmperson.ui.mvp.contract.FeedBackContract;
import com.chainyoung.component_tmperson.ui.mvp.contract.InviteFriendContract;

import java.util.TreeMap;

import javax.inject.Inject;

import io.reactivex.Flowable;

@ActivityScope
public class FeedBackModel extends BaseModel implements FeedBackContract.Model {

    @Inject
    FeedBackModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);

    }


    @Override
    public Flowable<String> feedBack(TreeMap<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(PersonService.class)
                .feedBack(map)
                .compose(RxUtils.<String>handleResult());
    }


}